<?php
require_once(realpath(dirname(__FILE__)) . '/../../Aplicación/models/Invoce.php');
require_once(realpath(dirname(__FILE__)) . '/../../Aplicación/models/Product.php');

/**
 * @access public
 * @author Edgar Morán
 * @package Aplicación.models
 */
class InvoiceProduct {
	/**
	 * @AttributeType int
	 */
	private $_quantity;
	/**
	 * @AssociationType Aplicación.models.Invoce
	 */
	public $_invoice;
	/**
	 * @AssociationType Aplicación.models.Product
	 * @AssociationKind Aggregation
	 */
	public $_product;
	/**
	 * @AssociationType Aplicación.models.Invoce
	 */
	public $_price;
    
    /**
     * constructor for class
     */
    public function __construct($aProduct, $aQuantity, $aPrice, $aInvoice=0){
        $this->_product = $aProduct;
        $this->_quantity = $aQuantity;
        $this->_price = $aPrice;
        $this->_invoice = $aInvoice;
    }

	/**
	 * @access public
	 * @return int
	 * @ReturnType int
	 */
	public function getQuantity() {
		return $this->_quantity;
	}

	/**
	 * @access public
	 * @param int aQuantity
	 * @return void
	 * @ParamType aQuantity int
	 * @ReturnType void
	 */
	public function setQuantity($aQuantity) {
		$this->_quantity = $aQuantity;
	}
    
	/**
	 * @access public
	 * @return int
	 * @ReturnType int
	 */
	public function getPrice() {
		return $this->_price;
	}

	/**
	 * @access public
	 * @param float aPrice
	 * @return void
	 * @ParamType aPrice float
	 * @ReturnType void
	 */
	public function setPrice($aPrice) {
		$this->_price = $aPrice;
	}

	/**
	 * @access public
	 * @return Product
	 * @ReturnType Product
	 */
	public function getProduct() {
		return $this->_product;
	}

	/**
	 * @access public
	 * @param Product aProduct
	 * @return void
	 * @ParamType aProduct Product
	 * @ReturnType void
	 */
	public function setProduct($aProduct) {
		$this->_product = $aProduct;
	}
}
?>